import Vue from 'vue'
import VueRouter from 'vue-router'
import Home from '../views/Home.vue'

Vue.use(VueRouter)

const routes = [
  {
    path: '/',
    redirect: '/home'
  },
  {
    path: '/home',
    name: 'home',
    component: Home,
    // redirect: '/home/nav',
    children: [
      {
        path: '/paihang',
        name: 'paihang',
        component: () => import('../components/Nav/Paihang.vue')
      },
      {
        path: '/gedan',
        name: 'gedan',
        component: () => import('../components/Nav/Gedan.vue')
      },
      {
        path: '/zhubo',
        mane: 'zhubo',
        component: () => import('../components/Nav/Zhubo.vue')
      },
      {
        path: '/singer',
        mane: 'singer',
        component: () => import('../components/Nav/Singer.vue')
      },
      {
        path: '/xindie',
        mane: 'xindie',
        component: () => import('../components/Nav/Xindie.vue')
      },
    ]
  },
  {
    path: '/personmusic',
    name: 'personmusic',
    component: () => import('../views/Personmusic.vue')
  },
  {
    path: '/guanzhu',
    name: 'guanzhu',
    component: () => import('../views/Guanzhu.vue')
  },
  {
    path: '/shangcheng',
    name: 'shangcheng',
    component: () => import('../views/Shangcheng.vue')
  },
  {
    path: '/yinyueren',
    name: 'yinyueren',
    component: () => import('../views/Yinyueren.vue')
  },
  {
    path: '/xiazai',
    name: 'xiazai',
    component: () => import('../views/Xiazai.vue')
  },
]

const router = new VueRouter({
  mode: 'history',
  base: process.env.BASE_URL,
  routes
})

export default router
